/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package jsalon.cls;

import jamjun.infra.model.UserSession;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;

/**
 *
 * @author Java
 */
public class JJDate {
    public static String ConvertToStrDate(Date date){
        try{
            String strDate = "";
            UserSession userSession = jamjun.infra.web.GSession.getUserSession();
            TimeZone timeZone = TimeZone.getTimeZone(userSession.strTimeZone);
            strDate=jamjun.infra.lang.JJDate.ConvertToStr(date, timeZone);
            return strDate;
        }catch(Exception e){
            throw e;
        }
    }
    public static String ConvertToStrDateTime(Date date){
        try{
            String strDate = "";
            UserSession userSession = jamjun.infra.web.GSession.getUserSession();
            TimeZone timeZone = TimeZone.getTimeZone(userSession.strTimeZone);
            strDate=jamjun.infra.lang.JJDate.ConvertToStrDateTime(date, timeZone);
            return strDate;
        }catch(Exception e){
            throw e;
        }
    }
    
}
